const $api = require('../../../../request/api').API;
Page({
  data: {
		points: 0,
		oldBalance:0,
		pmcBalance:0
  },
  onLoad: function (options) {
		$api.getUserIntegralAccount({}).then(res=>{
			this.setData({
				oldBalance:res.data.data.oldBalance || 0,
				pmcBalance:res.data.data.pmcBalance || 0,
				points:res.data.data.points || 0,
			})
		})
  },

  handleGotoPage(e) {
    const { route } = e.currentTarget.dataset;
    wx.navigateTo({ url: route });
  }
});
